const wxUser = require("../model/wxuser.model")
const {where} = require("sequelize");

class WxUserServer {
    async createwxUser(openId) {
        // todo:写入数据库
        const res = await wxUser.create({
            openId
        })
        return res
    }

    async selectOpenId(openId) {
        const res = await wxUser.findAll({where: {openId}})
        return res
    }
    async uploadtx(avatarUrl,id){
        const res=await wxUser.update({ avatarUrl}, { where: { id } } )
    }
}

module.exports = new WxUserServer();